<?php
/**
 * 描述
 * Created by Paco
 * Date: 2018/11/15 Time: 16:18
 */

namespace App\Models\Product;


use Illuminate\Database\Eloquent\Model;

class AttrName extends Model
{
    protected $table = 'attribue_name';
    protected $primaryKey = 'attr_id';
    protected $fillable = [
        'name',
        'is_alias',
        'is_spec',
        'is_required',
        'input_type',
        'group_number',
        'group_name',
        'is_search',
        'status',
        'sort',
    ];


    public function attrValue()
    {
        return $this->hasMany(AttrValue::class, 'attr_name_id', 'attr_id');
    }
}